<template>
	<view class="searchButton">
		<view class="searchButtonContent">
			<vanbutton icon="search" @click="toSearch" type="default" class="searchBtn" round block>{{context}}</vanbutton>
		</view>
	</view>
</template>

<script>
	import vanbutton from '@/wxcomponents/vant/@vant/button'
	export default{
		components:{
			vanbutton
		},
		props:{
			context:{
				type:String,
				default:'搜索产品'
			}
		},
		methods:{
			toSearch(){
				uni.navigateTo({
					url: '/packageA/pages/search/search'
				});
			}
		}
	}
</script>

<style lang="less">
	.searchButton{
		overflow: hidden;
		position: fixed;
		top: 0;
		width: 100%;
		height: 3.4rem;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: #99D28D;
		.searchButtonContent{
			width: 96%;
			color: #666;
		}
	}
</style>